package com.example.springgateway;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

@SpringBootApplication
@EnableDiscoveryClient
public class SpringGatewayApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringGatewayApplication.class, args);
    }
    /**
     *@createBy guoq
     *@createTime 2019/4/12
     *@return
     *@params
     *@describe  配置了一个id为index_route的路由规则，当访问http://172.17.0.16:9090/index的时候，转发到http://172.17.0.16:9000/index
     *
    */
    //    @Bean
    //    public RouteLocator customerRouteLocator(RouteLocatorBuilder builder){
    //        return  builder.routes()
    //                .route("index_route",r->r.path("/index").uri("http://172.17.0.16:9000/index"))
    //                .build();
    //    }

}
